﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;

namespace Faml
{
    public static class DictionaryHelper
    {
        public static OrderedDictionary CreateDictionary<Key, Value>(Key[] keys, Value[] values)
        {
            if (keys.Length != values.Length)
                throw new ArgumentException("Keys and values arrays must be of the same length");
            OrderedDictionary result = new OrderedDictionary();
            for (int i = 0; i < keys.Length; i++)
                result.Add(keys[i], values[i]);
            return result;
        }
    }
}
